package com.example.author.mapper;

import com.example.author.entity.Authorinformation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 凡哥哥
 * @since 2023-12-02
 */
@Mapper
public interface AuthorinformationMapper extends BaseMapper<Authorinformation> {
    @Select("select * from authorinformation where author_id = #{authorId}")
    Authorinformation findByAuthorId(Long id);
    @Update("update authorinformation set follower =#{follower},total_count = #{totalCount} where author_id = #{authorId}")
    void update(Authorinformation authorinformation);
}
